import {getBrandGoods} from '@/api/api'

export default {
    namespaced:true,
    actions:{
        async getBrandGoods(content,brand){
            try{
                const res = await getBrandGoods(brand)
                content.commit('GETBRANDGOODS',res.data.data)
            }catch(e){
                console.log(e)
            }
        }
    },
    mutations:{
        GETBRANDGOODS(state,val){
            state.brandGoods = val
        }   
    },
    state:{ 
        brandGoods:[]
    }
}